package study.source.common.resolver;

import java.util.Locale;

import org.springframework.core.Ordered;
import org.springframework.web.servlet.View;
import org.springframework.web.servlet.view.AbstractCachingViewResolver;


public class SpecialPurposeViewResolver extends AbstractCachingViewResolver
		implements Ordered {
	private int order;

	protected View loadView(String viewName, Locale locale) throws Exception {
		if (":json".equals(viewName)) {
			return new JSONView();
		}
		return null;
	}

	public int getOrder() {
		return this.order;
	}

	public void setOrder(int order) {
		this.order = order;
	}
}